package com.sokal.easycare.modules.forum.entity;

import org.hibernate.validator.constraints.Length;

import com.sokal.easycare.common.persistence.DataEntity;

/**
 * 论坛板块Entity
 * @author lihaipei
 * @version 2017-05-08
 */
public class ForumModule extends DataEntity<ForumModule> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 板块名称
	private Integer sort;		// 排序号
	private String status;		// 是否启用 0-未启用 1-启用
	private Integer forumCount;		// 帖子数量
	
	public ForumModule() {
		super();
		this.forumCount = 0;
		this.sort = 1;
	}

	public ForumModule(String id){
		super(id);
	}

	public ForumModule(Integer one) {
		super();
		this.status = "1"; 
	}
	
	@Length(min=0, max=200, message="板块名称长度必须介于 0 和 200 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}
	
	@Length(min=0, max=1, message="是否启用 0-未启用 1-启用长度必须介于 0 和 1 之间")
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	public Integer getForumCount() {
		return forumCount;
	}

	public void setForumCount(Integer forumCount) {
		this.forumCount = forumCount;
	}
	
}